package com.itheima.service.impl;

import com.itheima.dao.PermissionDao;
import com.itheima.domain.Permission;
import com.itheima.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * ClassName:PermissioinServiceImpl
 * Package:com.itheima.service.impl
 * Description:
 * Date:2020/3/12 15:39
 * User: snow
 */
@Service
@Transactional
public class PermissioinServiceImpl implements PermissionService {
	@Autowired
	private PermissionDao permissionDao;

	@Override
	public List<Permission> findAll() throws Exception {
		return permissionDao.findAll();
	}

	@Override
	public void save(Permission permission) throws Exception {
		permissionDao.save(permission);
	}

	@Override
	public Permission findById(String id) throws Exception {
		return permissionDao.findById(id);
	}
}
